package priv.stones.io.Scanner.file;

import java.io.File;
import java.io.FileFilter;

/**
 * @Author: Stones
 * @Description:
 * @Date: 2017/9/27 13:19
 */
public class File2 {

    public static void main(String[] args) {
        String path = "e:" + File.separator + "hello";
        File file = new File(path);
        printFile(file);
    }

    public static void printFile(File file) {
        if (file.isDirectory() && !file.isHidden()) {
            File[] list = file.listFiles();
            if (list != null) {
                for (int i = 0; i < list.length; i++) {
                    printFile(list[i]);
                }
            }
        }
        System.out.println(file);

    }

}
